3.144 \(\int (a-a \sec ^2(c+d x))^4 \, dx\)

Optimal. Leaf size=74 \[ \frac {a^4 \tan ^7(c+d x)}{7 d}-\frac {a^4 \tan ^5(c+d x)}{5 d}+\frac {a^4 \tan ^3(c+d x)}{3 d}-\frac {a^4 \tan (c+d x)}{d}+a^4 x \]

[Out]

a^4*x-a^4*tan(d*x+c)/d+1/3*a^4*tan(d*x+c)^3/d-1/5*a^4*tan(d*x+c)^5/d+1/7*a^4*tan(d*x+c)^7/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4120, 3473, 8} \[ \frac {a^4 \tan ^7(c+d x)}{7 d}-\frac {a^4 \tan ^5(c+d x)}{5 d}+\frac {a^4 \tan ^3(c+d x)}{3 d}-\frac {a^4 \tan (c+d x)}{d}+a^4 x \]

Antiderivative was successfully verified.

[In]

Int[(a - a*Sec[c + d*x]^2)^4,x]

[Out]

a^4*x - (a^4*Tan[c + d*x])/d + (a^4*Tan[c + d*x]^3)/(3*d) - (a^4*Tan[c + d*x]^5)/(5*d) + (a^4*Tan[c + d*x]^7)/
(7*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 4120

Int[(u_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[b^p, Int[ActivateTrig[u*tan[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \left (a-a \sec ^2(c+d x)\right )^4 \, dx &=a^4 \int \tan ^8(c+d x) \, dx\\ &=\frac {a^4 \tan ^7(c+d x)}{7 d}-a^4 \int \tan ^6(c+d x) \, dx\\ &=-\frac {a^4 \tan ^5(c+d x)}{5 d}+\frac {a^4 \tan ^7(c+d x)}{7 d}+a^4 \int \tan ^4(c+d x) \, dx\\ &=\frac {a^4 \tan ^3(c+d x)}{3 d}-\frac {a^4 \tan ^5(c+d x)}{5 d}+\frac {a^4 \tan ^7(c+d x)}{7 d}-a^4 \int \tan ^2(c+d x) \, dx\\ &=-\frac {a^4 \tan (c+d x)}{d}+\frac {a^4 \tan ^3(c+d x)}{3 d}-\frac {a^4 \tan ^5(c+d x)}{5 d}+\frac {a^4 \tan ^7(c+d x)}{7 d}+a^4 \int 1 \, dx\\ &=a^4 x-\frac {a^4 \tan (c+d x)}{d}+\frac {a^4 \tan ^3(c+d x)}{3 d}-\frac {a^4 \tan ^5(c+d x)}{5 d}+\frac {a^4 \tan ^7(c+d x)}{7 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 72, normalized size = 0.97 \[ a^4 \left (\frac {\tan ^{-1}(\tan (c+d x))}{d}+\frac {\tan ^7(c+d x)}{7 d}-\frac {\tan ^5(c+d x)}{5 d}+\frac {\tan ^3(c+d x)}{3 d}-\frac {\tan (c+d x)}{d}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a - a*Sec[c + d*x]^2)^4,x]

[Out]

a^4*(ArcTan[Tan[c + d*x]]/d - Tan[c + d*x]/d + Tan[c + d*x]^3/(3*d) - Tan[c + d*x]^5/(5*d) + Tan[c + d*x]^7/(7
*d))

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 82, normalized size = 1.11 \[ \frac {105 \, a^{4} d x \cos \left (d x + c\right )^{7} - {\left (176 \, a^{4} \cos \left (d x + c\right )^{6} - 122 \, a^{4} \cos \left (d x + c\right )^{4} + 66 \, a^{4} \cos \left (d x + c\right )^{2} - 15 \, a^{4}\right )} \sin \left (d x + c\right )}{105 \, d \cos \left (d x + c\right )^{7}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^4,x, algorithm="fricas")

[Out]

1/105*(105*a^4*d*x*cos(d*x + c)^7 - (176*a^4*cos(d*x + c)^6 - 122*a^4*cos(d*x + c)^4 + 66*a^4*cos(d*x + c)^2 -
 15*a^4)*sin(d*x + c))/(d*cos(d*x + c)^7)

________________________________________________________________________________________

giac [A]  time = 0.36, size = 66, normalized size = 0.89 \[ \frac {15 \, a^{4} \tan \left (d x + c\right )^{7} - 21 \, a^{4} \tan \left (d x + c\right )^{5} + 35 \, a^{4} \tan \left (d x + c\right )^{3} + 105 \, {\left (d x + c\right )} a^{4} - 105 \, a^{4} \tan \left (d x + c\right )}{105 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^4,x, algorithm="giac")

[Out]

1/105*(15*a^4*tan(d*x + c)^7 - 21*a^4*tan(d*x + c)^5 + 35*a^4*tan(d*x + c)^3 + 105*(d*x + c)*a^4 - 105*a^4*tan
(d*x + c))/d

________________________________________________________________________________________

maple [A]  time = 1.49, size = 125, normalized size = 1.69 \[ \frac {-a^{4} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+4 a^{4} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )-6 a^{4} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )-4 a^{4} \tan \left (d x +c \right )+a^{4} \left (d x +c \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a-a*sec(d*x+c)^2)^4,x)

[Out]

1/d*(-a^4*(-16/35-1/7*sec(d*x+c)^6-6/35*sec(d*x+c)^4-8/35*sec(d*x+c)^2)*tan(d*x+c)+4*a^4*(-8/15-1/5*sec(d*x+c)
^4-4/15*sec(d*x+c)^2)*tan(d*x+c)-6*a^4*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)-4*a^4*tan(d*x+c)+a^4*(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 129, normalized size = 1.74 \[ a^{4} x + \frac {{\left (5 \, \tan \left (d x + c\right )^{7} + 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 35 \, \tan \left (d x + c\right )\right )} a^{4}}{35 \, d} - \frac {4 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a^{4}}{15 \, d} + \frac {2 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{4}}{d} - \frac {4 \, a^{4} \tan \left (d x + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^4,x, algorithm="maxima")

[Out]

a^4*x + 1/35*(5*tan(d*x + c)^7 + 21*tan(d*x + c)^5 + 35*tan(d*x + c)^3 + 35*tan(d*x + c))*a^4/d - 4/15*(3*tan(
d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*a^4/d + 2*(tan(d*x + c)^3 + 3*tan(d*x + c))*a^4/d - 4*a^4*ta
n(d*x + c)/d

________________________________________________________________________________________

mupad [B]  time = 4.62, size = 61, normalized size = 0.82 \[ \frac {\frac {a^4\,{\mathrm {tan}\left (c+d\,x\right )}^7}{7}-\frac {a^4\,{\mathrm {tan}\left (c+d\,x\right )}^5}{5}+\frac {a^4\,{\mathrm {tan}\left (c+d\,x\right )}^3}{3}-a^4\,\mathrm {tan}\left (c+d\,x\right )+d\,x\,a^4}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a - a/cos(c + d*x)^2)^4,x)

[Out]

((a^4*tan(c + d*x)^3)/3 - a^4*tan(c + d*x) - (a^4*tan(c + d*x)^5)/5 + (a^4*tan(c + d*x)^7)/7 + a^4*d*x)/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a^{4} \left (\int 1\, dx + \int \left (- 4 \sec ^{2}{\left (c + d x \right )}\right )\, dx + \int 6 \sec ^{4}{\left (c + d x \right )}\, dx + \int \left (- 4 \sec ^{6}{\left (c + d x \right )}\right )\, dx + \int \sec ^{8}{\left (c + d x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)**2)**4,x)

[Out]

a**4*(Integral(1, x) + Integral(-4*sec(c + d*x)**2, x) + Integral(6*sec(c + d*x)**4, x) + Integral(-4*sec(c +
d*x)**6, x) + Integral(sec(c + d*x)**8, x))

________________________________________________________________________________________